package MyGO.Form;

import MyGO.utils.DateTimeUtils.DateTimeUtils;
import MyGO.utils.enumerastion.Department;
import MyGO.utils.enumerastion.DoctorLevel;
import MyGO.utils.enumerastion.VisTiOnDay;
import javafx.beans.property.StringProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDate;
import java.time.LocalDateTime;

import static MyGO.utils.DateTimeUtils.getTime.getDateTime;

@Data
@AllArgsConstructor
public class RegistForm {
    private String id;
    private String visitDate;
    private VisTiOnDay visTiOnDay;
    private Department department;
    private DoctorLevel doctorLevel;
    private String doctorID;
    private Double fee = 0.0;
    //private MedicalCard medicalCard;
    private String creatTime;
    private String finishTime;
    private String status;   // 状态维护
    private Boolean finish;

//    // 属性绑定
//    private StringProperty visTiOnDayStr;
//    private StringProperty depStr;
//    private StringProperty docLevStr;
//
//    public StringProperty getVisTiOnDayStr() {return this.visTiOnDayStr; }
//    public StringProperty getDepStr() {return this.depStr; }
//    public StringProperty getDocLevStr() {return  this.docLevStr; }

    public RegistForm() {
        this.creatTime = getDateTime();
        this.status = "未接诊";
        this.finish = false;
    }

    public void setVisitDate() {
        LocalDate localDate = LocalDate.now();
        this.visitDate = DateTimeUtils.formatLocalDate(localDate);
    }

    public void finish() {
        this.finishTime = getDateTime();
        this.finish = true;
    }
}
